**************************
*** Study 1 - Analyses ***
**************************

* setting directory
cd "~/dropbox/Moral decoupling/Study 1 - Israel - May 2020"

* load data
use "Study_1_dataset.dta", clear


****************************
** Descriptive statistics **
****************************
sum age
tab gender
tab religion
tab educ_level
tab right_vote
sum time


** Main DV **
sum DV 

** Overall difference b/w rightists and non-rightists in the DV **
ttest DV, by (right_vote)
esize twosample DV, by (right_vote) /* Cohen d = 0.64 */


** Relevance item **
sum relevance 

** Overall difference b/w rightists and non-rightists in the DV **
ttest relevance, by (right_vote)
esize twosample relevance, by (right_vote) /* Cohen d = 0.95 */


*************************************
** Analyses - Experimental results **
*************************************

* Table 1 - Model 1 - Right-wing voters
reg DV condition if right_vote==1, r
outreg2 using Table_1.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 


* Table 1 - Model 2 - Non Right-wing voters
reg DV condition if right_vote==0, r
outreg2 using Table_1.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Table 1 - Model 3 - All respondents
reg DV i.condition##i.right_vote, r
outreg2 using Table_1.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Reducation of the "partisan" gap
di .3535749/-1.491628 

* Retrodesign Power estimates
retrodesign .3535749, se(.2827843) alpha (0.05) df (824) 


** Figure 1 **
cibar DV, over1(condition) over2(right_vote) level(95) barcol(black gs14) graphopts(ylabel(,) graphregion(color(white)) ytitle("Inappropriateness of transgression"))


**********************
** Robustness tests **
**********************

** Table A3 - Treating "don't know" responses as mid-point **
gen DV_w_DK=DV
recode DV_w_DK (.=4)

* Model 1
reg DV_w_DK condition if right_vote==1, r
outreg2 using Table_A3.doc, replace se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

*  Model 2
reg DV_w_DK condition if right_vote==0, r
outreg2 using Table_A3.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Model 3
reg DV_w_DK i.condition##i.right_vote, r
outreg2 using Table_A3.doc, append se dec(2) alpha (.001, .01, .05) ///
symbol (***, **, *) 

* Retrodesign estimates (Power & S-Type error)
retrodesign .3624033, se(.2656441) alpha (0.05) df (893) 



*** Additional analyses (mentioned but not shown in the Online Resource) ***

* Dropping the fastest 5% of respondents *
sum time, d
reg DV i.condition##i.right_vote if time>198, r

* Dropping the fastest 10% of respondents *
reg DV i.condition##i.right_vote if time>224, r





*******************
** Balance tests **
*******************
** Not mentioned in the main text/Online Resource
ttest age, by (condition) /* p=.449*/
ttest time, by (condition) /* p=.454*/
tab gender_01 condition, chi col /* p=.996*/
tab jewish condition, chi col /* p=.437*/
tab educ_level condition, chi col /* p=.731*/
tab right_vote condition, chi col /* p=.523*/

logit condition age gender_01 jewish educ_level, r  /* p=.841*/
logit condition age gender_01 jewish educ_level right_vote, r  /* p=.899*/


